-- GENERATED SPELL FOR [Sarilus Foulborne] --


function spell0_3986(pUnit, Event) --@Frostbolt,n/a--
pUnit:FullCastSpellOnTarget(20806,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_3986', 7000, 1)
end

function spell1_3986(pUnit, Event) --@Sarilus\'s Elementals,Self--
pUnit:FullCastSpellOnTarget(6490,pUnit)
pUnit:RegisterEvent('Sorts_3986', 3000, 1)
end

function Sorts_3986(pUnit, Event)
local choix_sorts_3986 = math.random(0, 1)
if choix_sorts_3986 == 0 then
pUnit:RegisterEvent('spell0_3986', 1, 1)
end
if choix_sorts_3986 == 1 then
pUnit:RegisterEvent('spell1_3986', 1, 1)
end
end

function mob3986_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_3986', math.random(1500, 3000), 1)
end

function mob3986_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob3986_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob3986_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(3986, 1, 'mob3986_Action')
RegisterUnitEvent(3986, 2, 'mob3986_Leave')
RegisterUnitEvent(3986, 3, 'mob3986_Kill')
RegisterUnitEvent(3986, 4, 'mob3986_Die')
